import React from 'react';
import './index.css';
import { Icon } from 'antd';

export default class  extends React.Component {
    constructor(props){
        super();
        this.state={
            startIndex:0,   //图片起始位置
            img:props.img, //图片
        }
    }
    UNSAFE_componentWillReceiveProps(props){
        this.setState({
            startIndex:0,   //图片起始位置
            img:props.img, //图片
        });
    }
    //轮播图组件
    render(){
        return (
            <div className="CarouselBig">
                <div className="CarouselBig_Content">
                    <div className="CarouselBig_Content_Left">
                        <Icon type="arrow-left" />
                    </div>
                    <div className="CarouselBig_Content_BigBox">
                        <img alat="img" src={this.state.img} className="CarouselBig_Content_BigBox"/>
                    </div>
                    <div className="CarouselBig_Content_Right">
                        <Icon type="arrow-right" />
                    </div>
                </div>
            </div>
        );
    }
}
